import type { R, TableDataInfo } from '@/api/model/resultModel';
import type { XhljTopicActivityCollectForm, XhljTopicActivityCollectQuery, XhljTopicActivityCollectVo } from '@/api/xhlj/model/topicActivityCollectModel';
import { request } from '@/utils/request';

// 查询活动订阅列表
export function listTopicActivityCollect(query?: XhljTopicActivityCollectQuery) {
  return request.get<TableDataInfo<XhljTopicActivityCollectVo>>({
    url: '/xhlj/topicActivityCollect/list',
    params: query,
  });
}

// 查询活动订阅详细
export function getTopicActivityCollect(topicActivityCollectId: number) {
  return request.get<R<XhljTopicActivityCollectVo>>({
    url: `/xhlj/topicActivityCollect/${topicActivityCollectId}`,
  });
}

// 新增活动订阅
export function addTopicActivityCollect(data: XhljTopicActivityCollectForm) {
  return request.post<R<void>>({
    url: '/xhlj/topicActivityCollect',
    data,
  });
}

// 修改活动订阅
export function updateTopicActivityCollect(data: XhljTopicActivityCollectForm) {
  return request.put<R<void>>({
    url: '/xhlj/topicActivityCollect',
    data,
  });
}

// 删除活动订阅
export function delTopicActivityCollect(topicActivityCollectIds: number | Array<number>) {
  return request.delete<R<void>>({
    url: `/xhlj/topicActivityCollect/${topicActivityCollectIds}`,
  });
}
